﻿#ifndef JCURVEVIEW_H
#define JCURVEVIEW_H

#include "jcurve_global.h"
#include <QWidget>

// - class JCurveView -

class JCurveViewPrivate;

class JCURVE_EXPORT JCurveView : public QWidget
{
    Q_OBJECT
public:
    enum AxisXType
    {
        AxisXInvalid = -1,
        AxisXValue = 0x1,
        AxisXDateTime = 0x8
    };

    explicit JCurveView(QWidget *parent = 0);
    ~JCurveView();

    bool init();

    AxisXType axisType() const;
    void setAxisXType(AxisXType type);

    void clearCurve();
    bool appendCurve(const QList<QVariantList> &data);
    bool appendCurve(const QVariantList &data);
    bool appendCurve(const QString &name, const QList<QPair<QTime, qreal> > &data);

Q_SIGNALS:
    void doubleClicked(bool checked);

public Q_SLOTS:

private:

private:
    J_DECLARE_PRIVATE(JCurveView)
};

#endif // JCURVEVIEW_H
